<?php
/**
 * 教学经验模型
 * @author LXf
 * @date 2018.8.24
 */

namespace App\Model\Crm;

use App\model\BaseModel;
use DB;

class TeachExperienceModel extends BaseModel{
     /***
     *教学经验列表 
     ***/
    const TEACH_EXPERIENCE = 'teach_experience';
    public static function listExperience($orderby="id"){
        
        return DB::table(self::TEACH_EXPERIENCE)->orderBy($orderby)->get();

    }
    /***
     *添加教学经验 
     ***/
    public static function addExperience($data){
        
        return DB::table(self::TEACH_EXPERIENCE)->insert($data);

    }
     /***
     *修改教学经验 
     ***/
    public static function updateExperience($where,$data){
        
        return DB::table(self::TEACH_EXPERIENCE)->where($where)->update($data);

    }
    public static function delExperience($where){
       return DB::table(self::TEACH_EXPERIENCE)->where($where)->delete();
    }

}